package com.zhuqi.config;

import com.zhuqi.anno.LogPrint;
import com.zhuqi.aop.LogAopPrint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : ZhuQi
 * @version : 时间:2022/2/15 11:31 版本:
 * 自动配置类
 * web 环境才启动
 */
@Configuration
@ConditionalOnWebApplication
@ConditionalOnProperty(name = "log-print.enable", havingValue = "true")
public class LogAutoConfig {

    @Bean
    public LogAopPrint configLogAopPrint() {
        return new LogAopPrint();
    }

}
